﻿using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;

namespace QuanLyTuyenSinh.Operator
{
    public  partial class Operator
    {
        public static DataTable GetListEthnic()
        {
            _dtTable = new DataTable();
            string sql = "SELECT * From Ethnic";
            try
            {
                _dtTable = DataConfig.GetDataTable(sql);
            }
            catch (SqlException ex)
            {
                MessageBox.Show(ex.ToString());
            }
            return _dtTable;
        }
        public static DataTable GetListEthnicById(long ethnicId)
        {
            _dtTable = new DataTable();
            string sql = string.Format("SELECT * FROM Ethnic Where EthnicId= N'{0}'",  ethnicId);
            try
            {
                _dtTable = DataConfig.GetDataTable(sql);
            }
            catch (SqlException ex)
            {
                MessageBox.Show(ex.ToString());
            }
            return _dtTable;
        }
    }
}